#ifndef KEBUTTONCOMBOX_H_KKIKCCCCUY
#define KEBUTTONCOMBOX_H_KKIKCCCCUY

#include "../../../../kegui_global.h"


#include <QWidget>
#include <QPaintEvent>
#include <QFont>
#include <QPointF>
#include <QtTypes>




class KEGUI_EXPORT KeButtonCombox : public QWidget
{
    Q_OBJECT
public:
    KeButtonCombox(QWidget *parent=nullptr);
    ~KeButtonCombox();
    bool eventFilter(QObject *watched, QEvent *event) override;
public:
    void setTextCode(quint32 code);
    quint32 getTextCode()const;
    void setIconFont(const QFont &f);

protected:

    int getPos4Combox(const QPointF &point);
    // void enterEvent(QEnterEvent *event)override;
    void leaveEvent(QEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *) override;



Q_SIGNALS:
    void onClickedMComboxSignals(quint32 txtCode,int pos);
private:
    bool isWindowDeactivate;
    quint32 m_nTextCode;
    int  m_nIdTouchedDown;
    int  m_nMouseFlag;
    int  m_nMousePosition;
    QFont fontIcon;
    QPointF ptDown;

};

#endif // KEBUTTONCOMBOX_H
